<?php
/**
 * Created by PhpStorm.
 * User: jim
 * Date: 2017-01-08
 * Time: 18:22
 */

namespace App\Http\Middleware;

use Closure;
class CheckAdmin
{
    public function handle($request, Closure $next)
    {
        if(!session()->has('adminlist')){
            return redirect('admin/adminlogin');
        }
        return $next($request);
    }
}